package io.renren.modules.web.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.modules.web.entity.WebKnowledgeEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Web开发知识Dao
 */
@Mapper
public interface WebKnowledgeDao extends BaseMapper<WebKnowledgeEntity> {

    /**
     * 根据类型和章节ID获取知识
     */
    WebKnowledgeEntity getKnowledgeByTypeAndChapter(@Param("type") Integer type, @Param("chapterId") Integer chapterId);

    /**
     * 根据类型获取所有章节列表
     */
    List<WebKnowledgeEntity> getChaptersByType(@Param("type") Integer type);

    /**
     * 获取所有知识类型
     */
    List<WebKnowledgeEntity> getAllTypes();
} 